package com.hmdp.controller;


import com.hmdp.dto.Result;
//import com.hmdp.service.ISecService;
//import com.hmdp.service.IVoucherOrderService;
import com.hmdp.service.impl.SecServiceImpl;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 虎哥
 */
@RestController
@RequestMapping("/voucher-order")
public class VoucherOrderController {

//    @Resource
//    private IVoucherOrderService voucherOrderService;
//
//    @PostMapping("seckill/{id}")
//    public Result seckillVoucher(@PathVariable("id") Long voucherId) {
//        return voucherOrderService.seckillVoucher(voucherId);
//    }

    @Resource
    private SecServiceImpl secService;

    @PostMapping("TicketSeckill/{id}")
    public Result ticketSeckill(@PathVariable("id")Long eventId){

        return secService.ticketSeckill(eventId)  ;
    }
}
